<template>
  <div>
    <h1>{{data.title}}</h1>
    <div>
      <div>{{data.time}}</div>
      <div>{{data.writer}}</div>
    </div>
    <img :src="data.pic" alt="" v-if="data.type=='new'">
    <div v-html="data.contant">
    </div>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        data:'',
      }
    },
    mounted () {
      let url='http://127.0.0.1:3000/detailarea?id='+this.$route.query.id
      this.axios.get(url).then(res=>{
        this.data=res.data.results[0]
        console.log(this.data);
      })
    },
  }
</script>

<style scoped>
  img{
    width: 100%;
  }
</style>